<template>
  <div>
    <el-rate v-model="answer" @input="changeAnswer"
      :max="data"
      :show-score="true">
    </el-rate>
  </div>
</template>

<script>
export default {
  props: {
    data: {
      default: 5
    }
  },
  data () {
    return {
      answer : 0
    }
  },
  methods: {
    changeAnswer(){
      this.$emit('answerChange',this.answer)
    }
  },
  computed: {
  }
}
</script>
